Skip to content

[ATL-1141] Support for wildcard origins #629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 31, 2021
Merged

[ATL-1141] Support for wildcard origins #629

merged 2 commits into from
Mar 31, 2021

Conversation

umbynos
Copy link
Contributor

@umbynos umbynos commented Mar 30, 2021

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • Tests for the changes have been added (for bug fixes / features)
  • What kind of change does this PR introduce?

feature

  • What is the current behavior?

At the moment the fellow colleagues form IoT Cloud every time they want to test a PR they have to modify origins field inside config.ini

  • What is the new behavior?

One time modification in config.ini needed, now the origins field accepts the wildcard character.

  • Does this PR introduce a breaking change?

no

  • Other information:

@umbynos umbynos added type: enhancement Proposed improvement go labels Mar 30, 2021
@umbynos umbynos requested a review from AlbyIanna March 30, 2021 15:30
@umbynos umbynos self-assigned this Mar 30, 2021
@umbynos umbynos force-pushed the umbynos/add_origins branch from 20eb865 to c1b9c9e Compare March 31, 2021 09:15
@@ -327,7 +327,6 @@ func loop() {

extraOrigins := []string{
"https://create.arduino.cc",
"https://create-dev.arduino.cc", "https://create-intel.arduino.cc",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@endorama I removed these origins since they are old and rarely used, plus it's not good to have them hardcoded.
It's possible to add new origins using the origins filed in the config.ini file.
Just add your origins and separate them with ", "

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@umbynos is the description of the PR correct after the last changes?

@umbynos umbynos merged commit e8b6816 into main Mar 31, 2021
@umbynos umbynos deleted the umbynos/add_origins branch March 31, 2021 14:57
umbynos added a commit that referenced this pull request Mar 31, 2021
* remove old extraOrigins, they shouldn't be hardcoded

* replaced github.com/itsjamie/gin-cors with a fork to support wildcard
@rsora rsora added the go label Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants